home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr22 / cdir2_10.zip / CDIR2.DOC < prev    next >
Text File  |  1993-05-03  |  14KB  |  410 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. Color DIRectory utility
  13. Version 1.00 for OS/2
  14. Copyright 1993 by Dale Couch
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. What is CDIR2?
  30. --------------
  31.  
  32. CDIR2 is a utility that works the same as the DIR command that you are all
  33. accustomed to with OS/2 with one exception, it displays all of the filenames in
  34. color.  You can configure the default colors to use, what colors the directory
  35. entries should be, and you can define the color that files with certain
  36. extensions or certain strings should be.
  37.  
  38. CDIR2 v1.00 (OS/2) Copyright 1993 by Dale Couch                        Page 2
  39.  
  40.  
  41. How do I use CDIR2?
  42. ---------------------
  43.  
  44. SYNTAX:   CDIR2 [drive:[path]] [options]
  45.  
  46. USAGE:    Where drive represents a valid disk drive, locally attached or
  47.           remotely attached via a network.
  48.  
  49.           Where path represents a valid path present on that drive.
  50.  
  51.  
  52. Where [options] includes any of the following:
  53.  
  54. SYNTAX:   /A[adshr][-a-d-s-h-r]
  55.  
  56. USAGE:    Shows files with at least these attributes, based on the following:
  57.  
  58.           a represents the archive attribute
  59.           d represents the directory attribute
  60.           s represents the directory attribute
  61.           h represents the hidden attribute
  62.           r represents the system attribute
  63.  
  64.           if you include a '-' in front of an attribute all files that do not
  65.           have that attribute will be shown.
  66.  
  67. EXAMPLES:
  68.           
  69.      CDIR2 /Aas
  70.  
  71.           Will show all files that have the archive and system attribute bit
  72.           set on.
  73.  
  74.      CDIR2 /A-a-d
  75.  
  76.           Will show all files that do not have the archive bit set on and will
  77.           not show any directories.
  78.  
  79.      CDIR2 /A
  80.  
  81.           Will show all files, regardless of their attribute setting.
  82.  
  83.  
  84. SYNTAX:   /L
  85.  
  86. USAGE:    Shows all filenames in lower case.
  87.  
  88.  
  89. SYNTAX:   /N
  90.  
  91. USAGE:    Shows the file name at the end of the line instead of at the
  92.           beginning.  This option is set on for all Installable File System
  93.           (IFS) drives, such as HPFS or CDFS, by default, and cannot be turned
  94.           off.
  95.  
  96. CDIR2 v1.00 (OS/2) Copyright 1993 by Dale Couch                        Page 3
  97.  
  98.  
  99. [options] continued ...
  100.  
  101. SYNTAX:   /O[degns][-d-e-g-n-s]
  102.  
  103. USAGE:    Sorts the filenames in ascending order based on the following:
  104.  
  105.           d represents sort on file date and time
  106.           e represents sort on file extension
  107.           g represents display directories first
  108.           n represents sort on file name
  109.           s represents sort on file size     
  110.  
  111.           If you wish to reverse the order of the sort, place a '-' before the
  112.           sort option.
  113.  
  114.           The /On option will be ignored for all IFS drives, because it is
  115.           assumed that they are sorted in name order by default.
  116.  
  117.           Note:  If you receive a "Stack overflow!" message with this option
  118.           turned on, there are probably too many files (2000+) for CDIR2 to
  119.           sort.  To correct this problem, either use a different Sort Option or
  120.           do not attempt to sort the directory listing.
  121.  
  122. EXAMPLES:
  123.  
  124.      CDIR2 /Os 
  125.  
  126.           Will display files in smallest to largest file size order.
  127.  
  128.      CDIR2 /O-s
  129.  
  130.           Will display files in largest to smallest file size order.
  131.  
  132.  
  133. SYNTAX:   /P
  134.  
  135. USAGE:    Pauses the display of files for each screen page.  The page length
  136.           will be determined when CDIR2 is executed and will accommodate all
  137.           screen lengths.  Pressing ESC at any Pause prompt will exit CDIR2
  138.           without displaying any more information.
  139.  
  140.  
  141. SYNTAX:   /S
  142.  
  143. USAGE:    Recurse subdirectories, showing the contents of all subdirectories
  144.           from the current directory or [drive:[path]] down.
  145.  
  146.  
  147. SYNTAX:   /V
  148.  
  149. USAGE:    Shows additional information about your command line options.  It
  150.           will notify you of all of the options that are in effect.
  151.  
  152. CDIR2 v1.00 (OS/2) Copyright 1993 by Dale Couch                        Page 4
  153.  
  154.  
  155. [options] continued ...
  156.  
  157. SYNTAX:   /2
  158.  
  159. USAGE:    Shows the directory listing in 2 columns on an 80 column display and
  160.           will display in as many columns as the screen will allow in any other
  161.           screen mode.  The information that will be displayed, will be same
  162.           information that would be shown with the OS/2 DIR command.
  163.  
  164.  
  165. SYNTAX:   /3
  166.  
  167. USAGE:    will display the directory listing in 3 columns on an 80 column
  168.           display and will display in as many columns as the screen will allow
  169.           in any other screen mode.  The information that will be displayed is
  170.           the file name and file size.
  171.  
  172.  
  173. How do I read the CDIR directory listing?
  174. -----------------------------------------
  175.  
  176.    1           2    3      4       5     6
  177. CDIR2.EXE    12345    0 05-02-93 01:00a AHRS
  178.  
  179. 1 is the files name
  180.  
  181. 2 is the files size, for directory entries <DIR> will replace the number.
  182.  
  183. 3 is the files Extended Attribute (EA) Size
  184.  
  185. 4 is the files last access date
  186.  
  187. 5 is the files last access time, where: 
  188.      'a' represents am 
  189.      'p' represents pm
  190.  
  191. 6 shows the current file attributes, where:
  192.      'A' represents Archive 
  193.      'H' represents Hidden 
  194.      'R' represents Read Only 
  195.      'S' represents System 
  196.      '-' would represent that that attribute is not set to on for that file
  197.  
  198. CDIR2 v1.00 (OS/2) Copyright 1993 by Dale Couch                        Page 5
  199.  
  200.  
  201. What should I know about the CDIR2.CFG configuration file?
  202. ----------------------------------------------------------
  203.  
  204. There are 4 components to the configuration file.  There are definitions, which
  205. are used to define colors for easier reading of the configuration file.  To
  206. define a color you just need to add a # before a word and then follow that by
  207. a space and a numeric value between 0 and 255.  The next component is the $
  208. command.  There are 3 $ commands: $OPTIONS, $COLOR, and $DIRECTORY which are
  209. described below.  Next there are the string identifiers.  This is the string
  210. that CDIR2 uses to identify a color sequence to use to display that file entry. 
  211. And finally there are comments, which are added by placing a ; anywhere on a new
  212. line or after one of the other commands.  A sample configuration file is
  213. included at the end of this document.  This configuration file can be shared
  214. between CDIR2 (OS/2) and CDIR (DOS), just make sure that the configuration file
  215. and each of the executables are in the same directory.
  216.  
  217. Please Note:  The configuration file is read from top to bottom only once, so
  218. you must declare any # variables before you use them or you will be notified of
  219. an error.
  220.  
  221.  
  222. What does the # command do?
  223. ---------------------------
  224.  
  225. The configuration file comes with all of the colors predefined using the #
  226. command.  If you want to be able to mix your own colors or define new names for
  227. colors you can.  If you want to be able to have a color like blinking red, do
  228. this:  
  229.  
  230.      #BlinkRed RED + BLINK 
  231.  
  232. Only the space between #BlinkRed and RED is required.  Also at this time only
  233. addition is supported when defining colors to use.  You can use this addition
  234. method for any color definition parameter in the configuration file.
  235.  
  236.  
  237. What are the $ Commands?
  238. ------------------------
  239.  
  240. $OPTIONS   --  allows you to define what options you want on at all times.
  241.  
  242.      $OPTIONS   /p /v
  243.  
  244. $COLOR     --  allows you to define the default colors to use.
  245.  
  246.      $COLOR     LIGHTGRAY, BLACK
  247.  
  248. $DIRECTORY --  allows you to define the default colors to use for directory
  249.                entries.
  250.  
  251.      $DIRECTORY WHITE, BLACK
  252.  
  253. Note:     If you do not like using # variables you can always use numbers in
  254.           their place for any setting.
  255.  
  256. CDIR2 v1.00 (OS/2) Copyright 1993 by Dale Couch                        Page 6
  257.  
  258.  
  259. How do I define the Colors CDIR2 should use?
  260. --------------------------------------------
  261.  
  262. There are two separate ways to define what color files will appear in.  If a
  263. period '.' is the first character then it is assumed that for all occurrences
  264. of files with that extension that color will be used.  If any other character
  265. is first it will be assumed that for all occurrences of the string, the color
  266. you define will be used.  This option will be overridden by the color set for
  267. the extension.
  268.  
  269. .EXE  WHITE, BLUE
  270. CDIR2 YELLOW, BLUE
  271. .DIZ  RED+BLINK, BLACK
  272.  
  273. If we were to use the files that came in the CDIR2.ZIP file the following would
  274. be a description of the output.
  275.  
  276. CDIR2.EXE and CDIR.EXE would appear in WHITE on a BLUE background.
  277. CDIR2.CFG and CDIR2.DOC would appear in YELLOW on a BLUE background.
  278. FILE_ID.DIZ would appear in BLINKing RED on a BLACK background.
  279.  
  280.  
  281. What else should I know?
  282. ------------------------
  283.  
  284. CDIR2 does direct screen writes, so redirection of the output will not be
  285. possible.  This includes such command line functions as '> lpt1', '>>
  286. filename.out', and '| more'.  
  287.  
  288. There is a bug in all copies of OS/2 prior to the March 1993 Beta of OS/2 2.1. 
  289. This bug restricts CDIR2 from being able to locate file names contained on HPFS
  290. drives that have any of the following characters " ~ ! @ # $ ( ) " for its first
  291. character.  Other IFS systems may be affected but I have not confirmed this. 
  292. The OS/2 DIR command does not exhibit this problem and should be used to display
  293. these files.
  294.  
  295. CDIR2 looks for the .CFG file to be the same name.  If you want to rename CDIR2
  296. or CDIR to another name, be sure to rename the .CFG file to that same name, and
  297. that the .CFG remains in the same directory as CDIR2.  This will be the only way
  298. that CDIR2 will be able to find the configuration file.  The search order will
  299. not change or be effected by a name change, a '2' will be appended when
  300. necessary.  CDIR2 will first look for CDIR2.CFG and then CDIR.CFG, CDIR will
  301. first look for CDIR.CFG and then CDIR2.CFG.
  302.  
  303. CDIR2 v1.00 (OS/2) Copyright 1993 by Dale Couch                        Page 7
  304.  
  305.  
  306. This is shareware
  307. -----------------
  308.  
  309. CDIR2 is shareware and as such a monetary contribution of $5 would be greatly
  310. appreciated.  If you do not feel that a contribution is appropriate, but you do
  311. like the program, would you please send me a post card letting me know where
  312. CDIR2 has made it to.
  313.  
  314.  
  315. Warranties
  316. ----------
  317.  
  318. The author is not responsible for any problems occurring because of the use or
  319. misuse of this program.  It is the user's responsibility to be aware of the
  320. limitations of this program, whether documented here or not.  This program is
  321. not crippled in any way and you may freely copy this program and give it to your
  322. friends.
  323.  
  324.  
  325. Contacting the Author
  326. ---------------------
  327.  
  328. There are two ways that you can let me know that you like this program.  The
  329. first is to just send a post card to me at the below address.  If you find the
  330. program useful and would like to help finance future programs like this I would
  331. appreciate a contribution of $5.00.  You can send your post card or the
  332. contribution to:
  333.  
  334.                     Dale Couch
  335.                     5124 Conroy Road Suite 625
  336.                     Orlando, FL  32811-3739
  337.  
  338. If you would prefer to just send me an electronic message I can be reached
  339. through the RIME C conference at ->TREASURE, or on the Fido Net C conference. 
  340. Please feel free to make suggestions or notify me of any problems that you might
  341. find.
  342.  
  343.  
  344. Credits
  345. -------
  346.  
  347. Finally, I have a few credits to give.  First, I would like to thank my father
  348. for acting as a concept sounding board, and having a knack for finding the
  349. perfect piece of code.  I would also like to thank Ryan Smith for helping me to
  350. start and debug this project.
  351.  
  352. CDIR2 v1.00 (OS/2) Copyright 1993 by Dale Couch                        Page 8
  353.  
  354.  
  355. Other Products
  356. --------------
  357.  
  358. Syncit and Syncit/2 (Coming Soon)
  359. ----------------------------------
  360. Syncit has been designed to compare the contents of directories or entire
  361. drives, for those of you who maintain copies of files on other media.  This is
  362. also a perfect product for those people who need to constantly update a group
  363. of network drives.  It will compare all filenames, file sizes, file date, and
  364. even their attributes and report on any files that do not match.  This product
  365. will be available for DOS and OS/2 2.x
  366.  
  367.  
  368. Time Keeper/2 (Coming Soon)
  369. ----------------------------
  370. Time Keeper/2 will help you keep track of the time that you spend is specific
  371. applications while working in OS/2.  Maintaining a log of the hours and
  372. generating reports to give to your employers for billing purposes.
  373. CDIR2 v1.00 (OS/2) Copyright 1993 by Dale Couch                        Page 9
  374.  
  375.  
  376. ;
  377. ; This is a sample configuration file for CDIR2.  Just copy the
  378. ; contents of this page to the file CDIR2.CFG, if you are missing
  379. ; the original .CFG file.
  380. ;
  381. #BLACK        0
  382. #BLUE         1
  383. #GREEN        2
  384. #CYAN         3
  385. #RED          4
  386. #MAGENTA      5
  387. #BROWN        6
  388. #LIGHTGRAY    7
  389. #DARKGRAY     8
  390. #LIGHTBLUE    9
  391. #LIGHTGREEN   10
  392. #LIGHTCYAN    11
  393. #LIGHTRED     12
  394. #LIGHTMAGENTA 13
  395. #YELLOW       14
  396. #WHITE        15
  397. #BLINK        128
  398. ;
  399. ; DEFAULT Program settings
  400. ;
  401. $OPTIONS   /p /v            ; pause after each page and use verbose mode
  402. $COLOR     LIGHTGRAY, BLACK ; default text to white on black
  403. $DIRECTORY LIGHTGRAY,BLACK  ; default dir entries to white on black
  404. ;
  405. ; Begin Color Text definitions
  406. ;
  407. .EXE  WHITE,  BLUE           ; Comment after definition
  408. CDIR2 YELLOW, BLUE
  409. .DIZ  RED+BLINK, BLACK
  410.